//组队竞赛
////1,
////#include <iostream>
////#include <vector>
////#include <algorithm>
////using namespace std;
////
////int main()
////{
////    int n = 0;
////    while (cin >> n)
////    {
////        vector<int> v(3 * n);
////
////        long long sum = 0;
////
////        for (int i = 0; i < 3 * n; i++)
////        {
////            cin >> v[i];
////        }
////
////        std::sort(v.begin(), v.end());
////
////        for (int i = 0; i < n; i++)
////        {
////            sum += v[v.size() - (2 * (i + 1))];
////        }
////
////        cout << sum << endl;
////
////    }
////
////    return 0;
////}
////2,
////#include <iostream>
////#include <vector>
////#include <algorithm>
////#include <functional>
////using namespace std;
////
////int main()
////{
////    int n = 0;
////    while (cin >> n)
////    {
////        vector<int> v(3 * n);
////
////        long long sum = 0;
////
////        for (int i = 0; i < 3 * n; i++)
////        {
////            cin >> v[i];
////        }
////
////        // 快排---降序
////        std::sort(v.begin(), v.end(), greater<int>());
////
////        int index = 1;
////
////        // 从0下标开始，两两一组，选出n个某组的第二个元素
////        for (int i = 0; i < n; i++)
////        {
////            sum += v[index];
////            index += 2;
////        }
////
////        cout << sum << endl;
////    }
////
////    return 0;
////}
////3,
////#include <iostream>
////#include <queue>
////#include <vector>
////#include <functional>
////
////using namespace std;
////
////int main()
////{
////    int n = 0;
////
////    while (std::cin >> n)
////    {
////        priority_queue<int, vector<int>, less<int>> pq;
////
////        for (int i = 0; i < 3 * n; i++)
////        {
////            int input = 0;
////            std::cin >> input;
////
////            pq.push(input);
////        }
////
////        long long sum = 0;
////
////        for (int i = 0; i < n; i++)
////        {
////            pq.pop();
////            sum += pq.top();
////            pq.pop();
////        }
////
////        cout << sum << endl;
////
////    }
////    return 0;
////}
////删除公共字符
////1,
////#include <iostream>
////#include <string>
//////#include <map>
////#include <unordered_map>
////using namespace std;
////
////int main()
////{
////
////    string str1;
////    string str2;
////
////    getline(cin, str1);
////    getline(cin, str2);
////
////    unordered_map<int, bool> uMap;
////
////    for (auto e : str1)
////    {
////        uMap.insert(make_pair(e, false));
////    }
////
////    for (auto e : str2)
////    {
////        uMap[e] = true;
////    }
////
////    str2.clear();
////
////    for (auto e : str1)
////    {
////        if (uMap[e] == false)
////        {
////            str2 += e;
////        }
////    }
////
////    std::cout << str2 << endl;
////
////    return 0;
////}
////2,
////#include <iostream>
////#include <string>
////#include <vector>
////
////using namespace std;
////
////int main()
////{
////    string str1;
////    string str2;
////
////    getline(cin, str1);
////    getline(cin, str2);
////
////    vector<bool> v(256, false);
////
////    string::iterator it = str2.begin();
////
////    while (it != str2.end())
////    {
////        v[*it] = true;
////        it++;
////    }
////
////    str2.clear();
////
////    it = str1.begin();
////    while (it != str1.end())
////    {
////        if (v[*it] == false)
////        {
////            str2.push_back(*it);
////        }
////        it++;
////    }
////
////    std::cout << str2 << endl;
////
////    return 0;
////}
////只出现一次的数字
////class Solution {
////public:
////    int singleNumber(vector<int>& nums)
////    {
////        int ret = 0;
////        vector<int>::iterator it = nums.begin();
////        while (it != nums.end())
////        {
////            ret ^= *it;
////            it++;
////        }
////        return ret;
////    }
////};
////只出现一次的两个数字
////1,
////class Solution {
////public:
////    vector<int> singleNumber(vector<int>& nums)
////    {
////        map<int, int> m;
////
////        vector<int>::iterator it = nums.begin();
////
////        while (it != nums.end())
////        {
////            m[*it]++;
////            it++;
////        }
////
////        vector<int> ret;
////
////        map<int, int>::iterator itMap = m.begin();
////        while (itMap != m.end())
////        {
////            if (itMap->second == 1)
////            {
////                ret.push_back(itMap->first);
////            }
////            itMap++;
////        }
////        return ret;
////    }
////};
////2,
////class Solution {
////public:
////    vector<int> singleNumber(vector<int>& nums)
////    {
////        int myxor = 0;
////
////        vector<int>::iterator it = nums.begin();
////
////        while (it != nums.end())
////        {
////            myxor ^= *it;
////            it++;
////        }
////
////        int different = 0;
////
////        for (int i = 0; i < 32; i++)
////        {
////            if ((myxor >> i) & 1 == 1)
////            {
////                different = i;
////                break;
////            }
////        }
////
////        vector<int> ret(2, 0);
////
////        it = nums.begin();
////
////        while (it != nums.end())
////        {
////            if (((*it) >> different) & 1)
////            {
////                ret[0] ^= *it;
////            }
////            else
////            {
////                ret[1] ^= *it;
////            }
////            it++;
////        }
////
////        return ret;
////    }
////};
////电话号码的字母组合
//////const char* strArr[]={"","","abc","def","ghi",""}
//","pqrs","tuv","wxyz"};
////string strArr[] = { "","","abc","def","ghi"," }"
//","pqrs","tuv","wxyz" };
////
////class Solution {
////public:
////
////
////    void Group(string& digits, int index, string str, vector<string>& ret)
////    {
////        if (index >= digits.size())
////        {
////            ret.push_back(str);
////            return;
////        }
////
////
////
////        //for(int i=0;i<strlen(strArr[digits[index]-'0']);i++)
////        for (int i = 0; i < strArr[digits[index] - '0'].size(); i++)
////        {
////            Group(digits, index + 1, str + strArr[digits[index] - '0'][i], ret);
////        }
////
////    }
////
////    vector<string> letterCombinations(string digits)
////    {
////        if (digits == "")
////            return vector<string>();
////
////        vector<string> ret;
////
////        Group(digits, 0, string(), ret);
////
////        return ret;
////    }
////};
//
////typedef Reverse_Iterator<Iterator, T&, T*> reverse_iterator;
////typedef Reverse_Iterator<const_Iterator, const T&, const T*> const_reverse_iterator;
////
////reverse_iterator rbegin()
////{
////    return reverse_iterator(end());
////}
////
////reverse_iterator rend()
////{
////    return reverse_iterator(begin());
////}
////
////const_reverse_iterator rbegin() const
////{
////    return reverse_iterator(end());
////}
////
////const_reverse_iterator rend() const
////{
////    return reverse_iterator(begin());
////}
